<?php
session_start();
$rand = rand(1000,10000);
$_SESSION['rand'] = $rand;
$smarty->assign("rand",$_SESSION['rand']);
?>